package com.wc.AlgoOJ_train.train2_DP训练.c8.DP0501_数位和;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

/**
 * @Author congge
 * @Date 2024/1/17 17:04
 * @description 数位和
 * http://43.138.190.70:8888/p/DP0501
 */
public class Main {
    static FastReader sc = new FastReader();
    static PrintWriter out = new PrintWriter(System.out);
    static long l, r;
    static int N = 18;
    static long[] base = new long[N];
    static long[] rightNums = new long[N];
    static int[] nums = new int[N];

    public static void main(String[] args) {
        l = sc.nextLong();
        r = sc.nextLong();
        init();
        for (int i = 0; i < 10; i++) {
            out.print(dp(r, i) - dp(l - 1, i));
            out.print(' ');
        }
        out.println();
        out.flush();
    }

    static void init() {
        base[0] = 1;
        for (int i = 1; i < N; i++) {
            base[i] = base[i - 1] * 10;
        }
    }

    static long dp(long n, int x) {
        if (n == 0) return 0;
        int len = 0;
        while (n > 0) {
            nums[len++] = (int) (n % 10);
            n /= 10;
        }
        rightNums[1] = nums[0];
        for (int i = 1; i < len; i++) {
            rightNums[i + 1] = rightNums[i] + nums[i] * base[i];
        }
        long last = 0;
        long res = 0;
        for (int i = len - 1; i >= 0; i--) {
            int num = nums[i];
            res += last * base[i];
            if (x == 0) {
                res -= base[i];
            }
            if (num == x) {
                res += rightNums[i] + 1;
            }
            if (num > x) {
                res += base[i];
            }
            last = last * 10 + num;
        }
        return res;
    }
}

class FastReader {
    StringTokenizer st;
    BufferedReader br;

    FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    String nextLine() {
        String s = "";
        try {
            s = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return s;
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    // 是否由下一个
    boolean hasNext() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = br.readLine();
                if (line == null)
                    return false;
                st = new StringTokenizer(line);
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return true;
    }
}